Webpages are requested and served from web servers using Hypertext Transfer Protocol ‘HTTP’. A client application, for example, a web browser or an online help application, runs on a client computer. The client application sends an HTTP request to the web server, which returns an HTTP response. The HTTP response includes text for the webpage, usually in Hypertext Markup Language ‘HTML’ or eXtensible HTML ‘XHTML’ format. The HTTP response is accompanied by files referenced in the HTML or XHTML text, for example, image files, client-side scripts, and video files.
A static webpage presents the same fixed set of information to different users at different times. A dynamic webpage can change in response to different contexts or conditions. A client-side computer program, for example, client-side scripting, may be included in or referenced by a webpage that is retrieved from a web server. The client-side computer program, which may change the presentation of the webpage in the client application, is executed by the client computer through the client application. A server-side computer program, for example, server-side scripting, is executed by a web server when an HTTP request is received in order to generate dynamically the HTML or XHTML text to be returned in the HTTP response to the HTTP request.
Currently, video embedded in a webpage is typically played back in the web browser by a video player that is a platform-dependent plug-in to the web browser. Video players currently available include Microsoft® Windows Media® player, Microsoft® Silverlight® media player, Adobe® Flash® player, Apple® QuickTime® player and RealPlayer® media player. Different web browsers and even different versions of the same web browser may support different video players.
Video is stored in a video container file (“video file”), which usually includes a video track (without audio), plus one or more audio tracks (without video). The video track has been encoded using a video codec and each audio track has been encoded using an audio codec. Some video container formats, for example, the MPEG-4 Part 14 format commonly using file extension .MP4 described in the ISO/IEC 14496-14:2003 standard, are supported by many video players. Other video container formats, for example, the Flash Video format commonly using file extension .FLV, are supported only by a limited number of video players.
A webpage that embeds video may specify a single video player for playback of the video. In this case, the video will be played back only if the web browser that retrieves the webpage supports the specified video player. If the web browser that retrieves the webpage does not support the specified video player, the video will not be played back. This situation will occur frequently because no one video player is ubiquitous. The webpage may be created so that in the event that the web browser does not support the specified video player, a hyperlink is provided to a website where the specified video player can be downloaded. A person viewing the webpage in a web browser that does not support the specified video player may decide not to download the specified video player and the video will not be played back in the web browser. Even if that person does download the specified video player, the experience of the webpage is unsatisfactory due to the additional effort required by the person to view the video.
A webpage that embeds video may include client-side scripting that selects a video player based on various factors determined at the web browser. If execution of client-side scripting has been disabled in the web browser that retrieves the webpage, or if execution of client-side scripting is performed in the web browser only if permission from a user to do so is given and the user denies such permission, the video will not be played back in the web browser. The fact that video is embedded in the webpage may be hidden from search engines if the reference to the video is encapsulated in the client-side scripting, because some search engines do not execute any client-side scripting or do not execute all client-side scripting in a webpage. Inclusion in a webpage of client-side scripting for selection of a video player increases the amount of data retrieved from a web server, thus consuming more data communication resources, and burdens the web browser with the responsibility for video player selection, possibly slowing down the presentation of the webpage or the presentation of the video or both. The selection of the video player in the client-side scripting language may be expressed in the form of “if circumstance 1 select video player 1 else if circumstance 2 select video player 2 else if . . . else . . . ” to specify the video player in many different circumstances. The entire client-side scripting is sent to all client computers that retrieve the webpage from a web server, regardless of how much of the client-side script needs to be executed before the circumstances applicable to the client computer and its web browser are handled.